﻿import QtQuick 2.0

Item {

    id: root

    property string title: ""
    property double circleSize: 50*dp
    property string icon: "qrc:/picture/x_jx.png"
    property bool dtfl: false
    property bool isHovered: false

    signal released()

    height: circleSize + 30*dp
    width: circleSize

    Image{
        visible: true
        height: circleSize
        width: circleSize
        source: icon
        z:0
    }
    AnimatedImage{
        visible: dtfl
        height: circleSize
        width: circleSize
        source: icon
    }

    Item{
        height: 30*dp
        y: circleSize
        width: circleSize
        Text{
            font.pixelSize: 17*dp
            text: title
            anchors.centerIn: parent
        }
    }

    MouseArea{
        anchors.fill: parent
        cursorShape: Qt.PointingHandCursor
        hoverEnabled:true
        onEntered: {
            isHovered = true
        }onExited: {
            isHovered = false
        }
        onReleased: {
            root.released()
        }

    }
}
